<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xml:lang="ru"> 
    <head>
	<title>LocalCRM</title>
	<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
	<script src="js/jquery-ui-1.8.4.custom.min.js" type="text/javascript"></script>
	<script src="js/jquery.blockUI.js" type="text/javascript"></script>
	<script src="js/jquery.contextMenu.js" type="text/javascript"></script>
	<script src="js/crm/common.js" type="text/javascript"></script>
	<link href="css/redmond/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css"/>
	<link href="css/jquery.contextMenu.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
	<a href="javascript:history.back()" class="button">&laquo;&nbsp;Назад</a>
	<table align="center" width="70%" cellspacing="0" class="ui-widget ui-state-default ui-corner-top">
	    <thead class="ui-widget-header">
		<tr><th colspan="4">Задача</th></tr>
	    </thead>
	    <tbody class="ui-widget-content">
		<tr>
		    <td align="right"><strong>Номер задачи:</strong></td>
		    <td>{$task.id}</td>
		    <td align="right"><strong>Клиент:</strong></td>
		    <td><a href="customer-view.php?id={$task.customer_id}">{$task.customer_name|sslash}</a></td>
		</tr>
		<tr>
		    <td align="right"><strong>Постановщик:</strong></td>
		    <td>{$task.c_manager}</td>
		    <td align="right"><strong>Исполнитель:</strong></td>
		    <td>{$task.r_manager}</td>
		</tr>
		<tr>
		    <td align="right"><strong>Дата постановки:</strong></td>
		    <td>{if $task.date_time>0}{$task.date_time|date_format:'%d.%m.%Y, %H:%M'}{else}&mdash;{/if}</td>
		    <td align="right"><strong>Дата начала:</strong></td>
		    <td>{if $task.task_time>0}{$task.task_time|date_format:'%d.%m.%Y, %H:%M'}{else}&mdash;{/if}</td>
		</tr>
		<tr>
		    <td align="right"><strong>Суть задачи:</strong></td>
		    <td colspan="3">{$task.note}</td>
		</tr>
	    </tbody>
	    {if $task.close=='1'}
	    <tbody>
		<tr><td colspan="4" align="center"><strong>Задача закрыта</strong></td></tr>
	    </tbody>
	    {/if}
	</table>
	<hr/><br/>
	<table align="center" width="70%" cellspacing="0" class="ui-widget ui-state-default ui-corner-top">
	    <thead class="ui-widget-header">
		<tr><th colspan="3">История</th></tr>
	    </thead>
	    <tbody class="ui-widget-content">
	    {foreach from=$comments item=comment name=comments}
		<tr {if $smarty.foreach.comments.iteration is even}bgcolor="#f0f0ff"{/if}>
		    <td align="center" width="20%">{$comment.comment_date|date_format:'%d.%m.%Y, %H:%M'}</td>
		    <td>{$comment.manager_name}</td>
		    <td>{$comment.comment}</td>
		</tr>
	    {foreachelse}
		<tr><td colspan="4" align="center"><i>нет записей</i></td></tr>
	    {/foreach}
	    </tbody
	</table>
    </body>
</html>
